// 菜单相关请求
import request,{Method} from '@/libs/api.js'

// 获取一级菜单
export function getMenuLevel1(){
    return request({
        url : `/manager/menu/getMenuLevel1`,
        method: Method.GET,
    })
}

// 获取二级菜单和三级树
export function getMenuTree(id){
    return request({
        url : `/manager/menu/getMenuTree/${id}`,
        method: Method.GET,
    })
}

// 管理端登录时获取根据用户权限获取菜单
export function getUserMenu(memberId){
    return request({
        url : `/manager/menu/getUserMenu/${memberId}`,
        method: Method.GET,
    })
}

// 添加菜单
export function addMenu (params) {
    return request({
      url: '/manager/menu/addMenu',
      method: Method.POST,
      data: params
    });
}